<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>2021虎符CTF感受与反思 | 游心随笔</title><meta name="keywords" content="内部文档"><meta name="author" content="Ryan"><meta name="copyright" content="Ryan"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="Anna,Anna?">
<meta property="og:type" content="website">
<meta property="og:title" content="2021虎符CTF感受与反思">
<meta property="og:url" content="https://allenhugo.gitee.io/craft/2021%E8%99%8E%E7%AC%A6CTF%E5%A4%8D%E7%9B%98.html">
<meta property="og:site_name" content="游心随笔">
<meta property="og:description" content="Anna,Anna?">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img2.baidu.com/it/u=1359440257,1463543398&fm=26&fmt=auto&gp=0.jpg">
<meta property="article:published_time" content="2021-04-05T14:06:08.000Z">
<meta property="article:modified_time" content="2021-04-05T14:06:08.000Z">
<meta property="article:author" content="Ryan">
<meta property="article:tag" content="反思">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img2.baidu.com/it/u=1359440257,1463543398&fm=26&fmt=auto&gp=0.jpg"><link rel="shortcut icon" href="/allenhugo/img/favicon.ico"><link rel="canonical" href="https://allenhugo.gitee.io/craft/2021%E8%99%8E%E7%AC%A6CTF%E5%A4%8D%E7%9B%98"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/allenhugo/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/allenhugo/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '2021虎符CTF感受与反思',
  isPost: false,
  isHome: false,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2021-04-05 22:06:08'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><link rel="stylesheet" href="/css/darkred.css"><link rel="stylesheet" href="APlayer.min.css"><div id="aplayer"></div><script src="https://cdn.jsdelivr.net/gh/radium-bit/res@master/live2d/autoload.js" async></script><script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js" async></script><meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/allenhugo/atom.xml" title="游心随笔" type="application/atom+xml">
</head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="https://pic3.zhimg.com/v2-96ea43b46c46cb31e7e39154bd77cad2_r.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/allenhugo/archives/"><div class="headline">文章</div><div class="length-num">1</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/allenhugo/tags/"><div class="headline">标签</div><div class="length-num">2</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/allenhugo/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/allenhugo/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/allenhugo/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/allenhugo/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/allenhugo/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="not-home-page" id="page-header" style="background: linear-gradient(to right, rgb(89, 2, 77), rgb(88,81,98));"><nav id="nav"><span id="blog_name"><a id="site-name" href="/allenhugo/">游心随笔</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/allenhugo/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/allenhugo/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/allenhugo/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/allenhugo/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="page-site-info"><h1 id="site-title">2021虎符CTF感受与反思</h1></div></header><main class="layout" id="content-inner"><div id="page"><div id="article-container"><div class="hbe hbe-container" id="hexo-blog-encrypt" data-wpm="Oh, this is an invalid password. Check and try again, please." data-whm="OOPS, these decrypted content may changed, but you can still have a look.">
  <script id="hbeData" type="hbeData" data-hmacdigest="82f42f4f59ae64a13e069460333a89419a115409587d981e2ab415fd5679f628">822f4cde6d49e482e4a48a24dd0ef5ef48f6c2566bb5176c11dbc2001733eaea5a2968b2185c3f3ba9140406dc346f0416205b63570ec5b4f174cc7938963620fb5179cfd9ffc71c1ab499b5b875aaf1382b7e7dd78755a65acbb6eab484e4342a279cba0a4a912cea0debbc3ec3ab959a21840ecd6fa853dad0f1c051a5c088d98088f779bd3c83cb9f3eb616e5cf34383e5f096555b0ea9167100469b54935a788e1987a39dddf73fb06b98cc035214ba134044bb6191ba317ccd2fa1d95a438e45d4788f71bbed158212b40d5c2dd5966f1d3fd7ad9a499cdd2b29553b0f015a56ab412ea70a1206e6a91b2821a9b1dd83459f4ec153c30d79fcfa5cbc5be7a9301e64e4989b5f14d80f4a042ea161df6058df4fbeca8fd07647673e96bbf68c7c8c5f40b4de90e69a43a1ff779944420d8c1278d1b8317d22f95afb203d791d233666c92f315f31221d6740af474e87f1d12616d565d237d2f17739b2fe167c4c28be55520b5b938a23e5e0c7b9ed276bbbefd2fc61aedd8598a75d60daee7e8219be78f1414ced931101168462cd6a3626a8861728a2b0b7fab87e0b1c5e47068a851b38bde449ebdfb5343810227f540b593f5d571071dd1ec2f80b7dd0313688d562d5d8e4068d20c729ebb2ae49d483b31dbb76a4246600d3a9880236b1cf2dee85490306168f3f2ee1b342de7a3775e28cab1debf000d67920ec2cc606b6aa51f86e9a9f99776aa27b7afb57c4646e7656577cfa7251619457933bcd9877a16bc70aac6330d9f1eb364c2bb11ca0f0f336cc782e7ed28ae6311928786432d485cb5b7457e89a33efcc7379c88d2b474f024751e6f57ae36a0c74d5f622ad431925fd1cc14f1ab8438070f5599b765655aa6d942dbac5cbc92e26f9f3521122a8d480f53de61717bfcda76a7f1c1c198f34fa714c5a4a48a839f38892d8055b1fae4895bfac987dfba81ed025cf02b6bee56354c2b10d7b28436b2260b10872a0628bd7a317371a345a14fca2e3f9680b9fcb296175f589218c7fa7f1a4a6b38baad8f501ef5387e7caeaf08012e882c138451fb2ef40a2c5a5ce14f08ed2ee7b5620816381d1c1eb1cfb3a7dc7c974bfc6abafc9ff6f0ca011063d30bf0c8c56725032d3e55d59fd872f549fbaadd6a4b937cc5489951647c345b9c5bfc352911cac0f4f20ec73dfa826c68dff972dc78167b7f2ccb65564515d3f8b0f2dd3e659af8ecca8f32a101146e9e94965dd658915cc53ebb5a69ea892b09bfc112c9fd4a122930c3ba8f1a2f275fd0cdaa67e0d8dabf2a0418416340f963e79ded840a7110bdd989c59696660272ea794a8bca2e42fd5f182234f281a6f0cf1bd80b90ee96125071e705c1ea781d0a9472996e5dd4ebc7046f0eb5132803a0cdc14d68cb4505a6d4d9102e94b64cf2c0e5095fa49545702ef82faf69cc415fd07598ef7c3e6206d450b845c9800275d2be5c22f7d4acd75faecf493e9880006c7a63d625c245d55f03d282ea448a70b264f228ee23fc3ae4a0860561e134d39e73decffb2b1fc1177d5fd9f91a7e22a8c71822700bc004dfc9e245df50d05b7f1644b0e0784444b43d5a4b7c3cf89e644a8ebe72ed158e2bebfcc322e19b6a8f3ce1e3d2cabcec34aa1877014c5403a064cdac6d1526dd5794a0b6c4b2de2d95382b53264eda85d0106a76086d1585b50ff955a2844f2acfcb24cf6ba2f37ffec362b7dc0f92fd51b5a57bcd6a9bcfcba3c8d12b26c1659f6c731318b763d16cff6b9f4e32ef0db2969081caaef0e616c2d659836dae981724484e571ec0da35a6c8c9c69823495a65b4ca427921fc96cbe005d22f83d8188b3c4a41d1dbdb723e78a458e42a7d6f7621d67a811c1da6f75505f0fa26fed6c90f417ba110e2ce8e46eac25ea73f95928fd5f1ea87f71a332f925f078c111ddbc9888e3c27077c62ccba63c39e7579b001b2ba98efded621fe739b5356f3a923a19d4bddfc7c7a4531a412eaa4dca0dd4e5158c3ddb5211de0f6f889d376b034242035824c622e16ffa71f6b6b13b7f91e89eefa8cd7c4fc070e3d412200645b64c04201aa4c6b66fd254dcd16b132bfa67c44700dab05af186a68f410a89215e32ae2f81f1e54210863f8e5ab526d2f4f286aa8ffed8de1b30d707c9613f0124750a1b1b02601a69963a27f11ffa367be17179a9322602129ac28ce59a2109e499e32bcc39de9104471ac96a59345ba3901881b7250c8718cc7f84f1214bdaa1eac1ba50d863f5e1dd930e1359913a7825e9b3e8ac8cbba732fe1848c1014bf38a368e717637d567b627612add83a5e254fae07bc1c94ec4119185e1b99231d615a9151255736359cc78fd9be31ae43f8ded5ec1209670e0cab8c81e7490d361469eac74fd4c04b9560765971d9f0749de368cd26ff4412a8a2ba86a5d713c72b0c396bad4306c194f8429c05ff593715df2fa8373e898189247c242cbd389744b90e70bcad5ab8b0b7e82eb1259f9e25e66d8dedd72eb6d5697d9ec5b45764db35b793e75cc80e555aabeaf2337598aea4cf70906c037a3a8899786c0fd48086437fbd580507d84db6481bd7cce217395aec16055392bd41165ca158c2a030675bd306945c77f6c89cf1df11d29f9b992932fe3bf92ce0943c5668955f51252bbf9d6dd71e393ddf3517057842fadf827342bc8f671b0c2d0caab227aa7bb59aea39a51b206bb37c29030c88bbbce617da59d7f24e3a61fd5695288390b856ca3e69d25372ba820986299517941922805967a2e45dc9df1a2d60ef3d6c862d693ecb365e186255b2d39e256fa4f4ed7bc8016f49e47658199cf0f837a2263b12d9f200679384b286969862e312a9aa866d2bb50917716d33236e2c5dd63d1e875610a6551a482325b041a9d4d062daecf71315f3cffd5312ba4d741a8cede93a342b59c084b8cf3034f058eae43c6dca1a83b8a6d84334fc47075d5c318da07f0d8b63f09e79b8261d4e75a27158a93ce20a8fbacbe44ff49e0c17a3cea8f023e21aa0113b38754dcd41f2a3da82d0768e366cf84e07778f22c9a60b5c6dc0d0cf3dfc5bde7f6c48cc8127c999b38fc6e3f2dbcab898db9ff2b954890c29ae3555e3b017fb7db264b05b2bafe678ba82ef9fa15edd8a518999a0f7c531a4ec702a53175e3b81f563df968f041a7605e95b259209b31a22e220bbf4597ce4315f49513e45f43881a48d0223ba24f4f57c2e7ba42deb1fda6ee4666530112b916ebf0f95565a75a37536064c0088915dcb841f1aebccce9d88771b1698a0c1da8a96a8fd7e620175dba0ed3d7c26bbd2ec340dbcba1bbecbf8839742e00ede39a07bb4fcb7b68c8b38efba193e912d144e6ded8e799c6f2c39cbec429a510345a813d53fc80c31043b1539edeb12edc5537791db3ab8d02908d5f9cb0de87d2102dc03d3d7e889f9b975159e9f1779bd8bb2c809b0b514bc53fadab5f1f10334d19e72c18afcd7640d487524e22f613d74d8b8cbf1f77362015015dbcbfd5c0c8bd22d26d22f2ea34be55b98a2c876494f61fdb5384255a672366da5353206f7d8ffcc5baa0c39efd15b083d6feaef5ed6b40d819ce059a146cc4b21fd4624ed7e1493dbb30e204aa41b3ac7b8d9bb03b0d91ca0a98862c22847410be6cd8e40adab914221c472201cc0eb625f03f1763f743b77cd90023ad1fdda2ac136a9dc72b2b361ef43a9df169d5165f975afbd24d4a191c683605421756466bd966d4fe5a6ca0cdce0fe0eb9b8be77b844fa448fd8dfa2667ce566cfa0e258a38795b183d2a3fe8933f354a37df9da2f185b1360afc79c85a8558e91e1189538503ef20a955f85b9</script>
  <div class="hbe hbe-content">
    <div class="hbe hbe-input hbe-input-default">
      <input class="hbe hbe-input-field hbe-input-field-default" type="password" id="hbePass">
      <label class="hbe hbe-input-label hbe-input-label-default" for="hbePass">
        <span class="hbe hbe-input-label-content hbe-input-label-content-default">队名V</span>
      </label>
    </div>
  </div>
</div>
<script data-pjax src="/allenhugo/lib/hbe.js"></script><link href="/allenhugo/css/hbe.style.css" rel="stylesheet" type="text/css"></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="https://pic3.zhimg.com/v2-96ea43b46c46cb31e7e39154bd77cad2_r.jpg" onerror="this.onerror=null;this.src='/allenhugo/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">Ryan</div><div class="author-info__description">Low Roar</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/allenhugo/archives/"><div class="headline">文章</div><div class="length-num">1</div></a></div><div class="card-info-data-item is-center"><a href="/allenhugo/tags/"><div class="headline">标签</div><div class="length-num">2</div></a></div><div class="card-info-data-item is-center"><a href="/allenhugo/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/RyanLee1024"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content"></div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/allenhugo/2021/02/15/Longhu-traval/" title="龙湖公园"><img src="https://img-blog.csdnimg.cn/2021021620042425.jpg" onerror="this.onerror=null;this.src='/allenhugo/img/cover0.jpg'" alt="龙湖公园"/></a><div class="content"><a class="title" href="/allenhugo/2021/02/15/Longhu-traval/" title="龙湖公园">龙湖公园</a><time datetime="2021-02-16T02:05:24.000Z" title="发表于 2021-02-16 10:05:24">2021-02-16</time></div></div></div></div><div class="card-widget" id="card-newest-comments"><div class="item-headline"><i class="fas fa-bolt"></i><span>最新评论</span></div><div class="aside-list"><span>正在加载中...</span></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/allenhugo/categories/%E6%97%85%E6%B8%B8/"><span class="card-category-list-name">旅游</span><span class="card-category-list-count">1</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/allenhugo/tags/%E5%B1%B1%E6%B0%B4/" style="font-size: 1.1em; color: #999">山水</a> <a href="/allenhugo/tags/%E9%83%91%E5%B7%9E/" style="font-size: 1.1em; color: #999">郑州</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/allenhugo/archives/2021/02/"><span class="card-archive-list-date">二月 2021</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">1</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2021-01-06T05:00:00.000Z"></div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-05-08T02:58:20.703Z"></div></div></div></div></div><div class="card-widget card-hitokoto"><div class="card-content"><div class="item-headline"><i class="fas fa-quote-left"></i><span>一言</span><div id="hitokoto">:D 获取中...</div><i id="hitofrom">:D 获取中...</i><script src="https://cdn.jsdelivr.net/npm/bluebird@3/js/browser/bluebird.min.js"></script><script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@2.0.3/fetch.min.js"></script><script>fetch('https://v1.hitokoto.cn')
  .then(function (res){
  return res.json();
})
.then(function (data) {
  var hitokoto = document.getElementById('hitokoto');
  hitokoto.innerText = data.hitokoto;
  var hitofrom = document.getElementById('hitofrom');
  hitofrom.innerText = "　　　　　——" + data.from + '';
})
.catch(function (err) {
  console.error(err);
})</script></div></div></div></div></main><footer id="footer" style="background: linear-gradient(to right, rgb(89, 2, 77), rgb(88,81,98));"><div id="footer-wrap"><div class="copyright">&copy;2021 - 2022 By Ryan</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/allenhugo/js/utils.js"></script><script src="/allenhugo/js/main.js"></script><div class="js-pjax"><script>function loadValine () {
  function initValine () {
    const valine = new Valine(Object.assign({
      el: '#vcomment',
      appId: '0bSC5wlLWBi6zASzPSWs3r2n-gzGzoHsz',
      appKey: 'cn09RBBIS0iTGR4frR3elmQ9',
      placeholder: '',
      avatar: 'monsterid',
      meta: 'nick,link'.split(','),
      pageSize: '10',
      lang: 'zh-CN',
      recordIP: true,
      serverURLs: 'https://0bsc5wll.lc-cn-n1-shared.com',
      emojiCDN: '',
      emojiMaps: "",
      enableQQ: true,
      path: window.location.pathname,
      requiredFields: ["nick,mail"],
      visitor: false
    }, null))
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://cdn.jsdelivr.net/gh/HCLonely/Valine@latest/dist/Valine.min.js').then(initValine)
}

if ('Valine' === 'Valine' || !false) {
  if (false) btf.loadComment(document.getElementById('vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script></div><script src="https://cdn.jsdelivr.net/npm/blueimp-md5@2.17.0/js/md5.min.js"></script><script>window.addEventListener('load', () => {
  const changeContent = (content) => {
    if (content === '') return content

    content = content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '[图片]') // replace image link
    content = content.replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, '[链接]') // replace url
    content = content.replace(/<pre><code>.*?<\/pre>/gi, '[代码]') // replace code
    content = content.replace(/<[^>]+>/g,"") // remove html tag

    if (content.length > 150) {
      content = content.substring(0,150) + '...'
    }
    return content
  }

  const getIcon = (icon, mail) => {
    if (icon) return icon
    let defaultIcon = '?d=monsterid'
    let iconUrl = `https://gravatar.loli.net/avatar/${md5(mail.toLowerCase()) + defaultIcon}`
    return iconUrl
  }

  const generateHtml = array => {
    let result = ''

    if (array.length) {
      for (let i = 0; i < array.length; i++) {
        result += '<div class=\'aside-list-item\'>'

        if (true) {
          const name = 'src'
          result += `<a href='${array[i].url}' class='thumbnail'><img ${name}='${array[i].avatar}' alt='${array[i].nick}'></a>`
        }

        result += `<div class='content'>
        <a class='comment' href='${array[i].url}'>${array[i].content}</a>
        <div class='name'><span>${array[i].nick} / </span><time datetime="${array[i].date}">${btf.diffDate(array[i].date, true)}</time></div>
        </div></div>`
      }
    } else {
      result += '没有评论'
    }

    let $dom = document.querySelector('#card-newest-comments .aside-list')
    $dom.innerHTML= result
    window.lazyLoadInstance && window.lazyLoadInstance.update()
    window.pjax && window.pjax.refresh($dom)
  }

  const getComment = () => {
    const serverURL = 'https://0bsc5wll.lc-cn-n1-shared.com'

    var settings = {
      "method": "GET",
      "headers": {
        "X-LC-Id": '0bSC5wlLWBi6zASzPSWs3r2n-gzGzoHsz',
        "X-LC-Key": 'cn09RBBIS0iTGR4frR3elmQ9',
        "Content-Type": "application/json"
      },
    }

    fetch(`${serverURL}/1.1/classes/Comment?limit=6&order=-createdAt`,settings)
      .then(response => response.json())
      .then(data => {
        const valineArray = data.results.map(function (e) {
          return {
            'avatar': getIcon(e.QQAvatar, e.mail),
            'content': changeContent(e.comment),
            'nick': e.nick,
            'url': e.url + '#' + e.objectId,
            'date': e.updatedAt,
          }
        })
        saveToLocal.set('valine-newest-comments', JSON.stringify(valineArray), 10/(60*24))
        generateHtml(valineArray)
      }).catch(e => {
        const $dom = document.querySelector('#card-newest-comments .aside-list')
        $dom.innerHTML= "无法获取评论，请确认相关配置是否正确"
      }) 
  }

  const newestCommentInit = () => {
    if (document.querySelector('#card-newest-comments .aside-list')) {
      const data = saveToLocal.get('valine-newest-comments')
      if (data) {
        generateHtml(JSON.parse(data))
      } else {
        getComment()
      }
    }
  }

  newestCommentInit()
  document.addEventListener('pjax:complete', newestCommentInit)
})</script><script src="//lib.baomitu.com/jquery/3.5.1/jquery.min.js"></script><script src="https://myhkw.cn/api/player/1624551176110" id="myhk" key="1624551176110" m="1"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = [
  'title',
  '#config-diff',
  '#body-wrap',
  '#rightside-config-hide',
  '#rightside-config-show',
  '.js-pjax'
]

if (false) {
  pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
}

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener toc scroll 
  window.removeEventListener('scroll', window.tocScrollFn)

  typeof preloader === 'object' && preloader.initLoading()
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // Analytics
  if (false) {
    MtaH5.pgv()
  }

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>